<?php include THEMES_PATH.'public/before_body2.phtml';?>
<link href="/statics/front/css/measure.css" rel="stylesheet">
</head>
<body>
<?php include THEMES_PATH.'public/header2.phtml';?>
<?php if(!$edit_type):?>
<div class="main-width progress-bar progress-bar-2 js-progress-bar">
  <em style="left:46%;">step 1 of 2</em>
  <ul>
    <li class="complete"><i></i></li>
    <li><i></i></li>
  </ul>
</div>
<?php endif;?>
<div class="main-width align-center form-box">
  <form id="measureForm" action="__SELF__" method="POST">
    <div class="inner js-inner"<?php if($edit_type){echo ' style="height:544px;"';}?>>
      <dl<?php if(!$edit_type):?> style="display:block;"<?php endif;?>>
        <dt><?php echo L('measure_estimation_2');?></dt>
        <dd>
          <em><?php echo L('measure_estimation_11');?></em>
          <div class="option-box js-option-box">
            <input type="text" name="sleeve_size" autocomplete="off" />
            <i class="triangle-down"></i>
            <div class="hide dropdown">
              <?php if($size_value['status'] == 1):?>
                <?php if($size_value['eur_size']):?>
                  <ul class="child">
                    <li class="size-type">EUR</li>
                    <?php foreach($size_value['eur_size'] as $v):?>
                    <li><?php echo $v;?></li>
                    <?php endforeach;?>
                  </ul>
                  <?php endif;?>
                  <?php if($size_value['us_size']):?>
                  <ul class="child">
                    <li class="size-type">US</li>
                    <?php foreach($size_value['us_size'] as $v):?>
                    <li><?php echo $v;?></li>
                    <?php endforeach;?>
                  </ul>
                <?php endif;?>
              <?php endif;?>
            </div>
          </div>
        </dd>
        <dd>
          <em><?php echo L('measure_estimation_12');?></em>
          <div class="option-box js-option-box">
            <input type="text" name="pants_hip" autocomplete="off" />
            <i class="triangle-down"></i>
            <ul class="dropdown hide">
              <li>29</li>
              <li>30</li>
              <li>31</li>
              <li>32</li>
              <li>33</li>
              <li>34</li>
              <li>35</li>
              <li>36</li>
              <li>37</li>
              <li>38</li>
              <li>39</li>
              <li>40</li>
              <li>41</li>
              <li>42</li>
              <li>43</li>
              <li>44</li>
            </ul>
          </div>
        </dd>
      </dl>
      <div<?php if($edit_type == 'describe'){echo ' style="display:block;"';}?>>
        <p class="title mb1x"><?php echo L('measure_physique');?></p>
        <div class="clearfix align-left physique js-physique">
          <dl class="pull-left">
            <dt>
              <strong><?php echo L('shoulders');?></strong>
              <?php if(isset($measure['shoulder']['type'])){?>
              <?php if($measure['shoulder']['type']==1){?>
              <em>(<?php echo L('square_shoulders');?>)</em>
              <?php }elseif($measure['shoulder']['type']==2){?>
              <em>(<?php echo L('between_square_and_rounder');?>)</em>
              <?php }elseif($measure['shoulder']['type']==3){?>
              <em>(<?php echo L('rounder_shoulders');?>)</em>
              <?php }elseif($measure['shoulder']['type']==4){?>
              <em>(<?php echo L('between_rounder_and_sloping');?>)</em>
              <?php }else{?>
              <em>(<?php echo L('sloping_shoulders');?>)</em>
              <?php }?>
              <?php }else{?>
              <em>(<?php echo L('rounder_shoulders');?>)</em>
              <?php }?>
              <input type="hidden" name="measure[shoulder][type]" value="<?php echo isset($measure['shoulder']['type']) ? $measure['shoulder']['type'] : '3'?>" />
            </dt>
            <dd<?php if($measure['shoulder']['type'] == 1){echo ' class="active" ';}?> data-physique="<?php echo L('square_shoulders');?>" data-physique-val="1">
              <img src="/statics/front/images/measure/shoulders1.jpg" />
              <img src="/statics/front/images/measure/shoulders1-1.jpg" class="bright" />
              <p><?php echo L('square_shoulders');?></p>
              <i class="mark"></i>
            </dd>
            <dd<?php if($measure['shoulder']['type'] == 3 || !isset($measure['shoulder']['type'])){echo ' class="active" ';}?> data-physique="<?php echo L('rounder_shoulders');?>" data-physique-val="3">
              <img src="/statics/front/images/measure/shoulders2.jpg" />
              <img src="/statics/front/images/measure/shoulders2-1.jpg" class="bright" />
              <p><?php echo L('rounder_shoulders');?></p>
              <i class="mark"></i>
            </dd>
            <dd<?php if($measure['shoulder']['type'] == 5){echo ' class="active" ';}?> data-physique="<?php echo L('sloping_shoulders');?>" data-physique-val="5">
              <img src="/statics/front/images/measure/shoulders3.jpg" />
              <img src="/statics/front/images/measure/shoulders3-1.jpg" class="bright" />
              <p><?php echo L('sloping_shoulders');?></p>
              <i class="mark"></i>
            </dd>
          </dl>
          <dl class="pull-right">
            <dt>
              <strong><?php echo L('chest');?></strong>
              <?php if(isset($measure['chest']['type'])){?>
              <?php if($measure['chest']['type']==1){?>
              <em>(<?php echo L('muscular_chest');?>)</em>
              <?php }elseif($measure['chest']['type']==2){?>
              <em>(<?php echo L('between_muscular_and_flat');?>)</em>
              <?php }elseif($measure['chest']['type']==3){?>
              <em>(<?php echo L('flat_chest');?>)</em>
              <?php }elseif($measure['chest']['type']==4){?>
              <em>(<?php echo L('between_flat_and_large');?>)</em>
              <?php }else{?>
              <em>(<?php echo L('large_chest');?>)</em>
              <?php }?>
              <?php }else{?>
              <em>(<?php echo L('flat_chest');?>)</em>
              <?php }?>
              <input type="hidden" name="measure[chest][type]" value="<?php echo isset($measure['chest']['type']) ? $measure['chest']['type'] : '3'?>" />
            </dt>
            <dd<?php if($measure['chest']['type'] == 1){echo ' class="active" ';}?> data-physique="<?php echo L('muscular_chest');?>" data-physique-val="1">
              <img src="/statics/front/images/measure/chest1.jpg" />
              <img src="/statics/front/images/measure/chest1-1.jpg" class="bright" />
              <p><?php echo L('muscular_chest');?></p>
              <i class="mark"></i>
            </dd>
            <dd<?php if($measure['chest']['type'] == 3 || !isset($measure['chest']['type'])){echo ' class="active" ';}?> data-physique="<?php echo L('flat_chest');?>" data-physique-val="3">
              <img src="/statics/front/images/measure/chest2.jpg" />
              <img src="/statics/front/images/measure/chest2-1.jpg" class="bright" />
              <p><?php echo L('flat_chest');?></p>
              <i class="mark"></i>
            </dd>
            <dd<?php if($measure['chest']['type'] == 5){echo ' class="active" ';}?> data-physique="<?php echo L('large_chest');?>" data-physique-val="5">
              <img src="/statics/front/images/measure/chest3.jpg" />
              <img src="/statics/front/images/measure/chest3-1.jpg" class="bright" />
              <p><?php echo L('large_chest');?></p>
              <i class="mark"></i>
            </dd>
          </dl>
          <dl class="pull-left">
            <dt>
              <strong><?php echo L('flat_stomach_1');?></strong>
              <?php if(isset($measure['stomach']['type'])){?>
              <?php if($measure['stomach']['type']==1){?>
              <em>(<?php echo L('flat_stomach ');?>)</em>
              <?php }elseif($measure['stomach']['type']==2){?>
              <em>(<?php echo L('between_flat_and_slightly_rounded ');?>)</em>
              <?php }elseif($measure['stomach']['type']==3){?>
              <em>(<?php echo L('slightly_rounded_stomach');?>)</em>
              <?php }elseif($measure['stomach']['type']==4){?>
              <em>(<?php echo L('between_slightly_rounded _and_rounded');?>)</em>
              <?php }else{?>
              <em>(<?php echo L('rounded_stomach');?>)</em>
              <?php }?>
              <?php }else{?>
              <em>(<?php echo L('slightly_rounded_stomach');?>)</em>
              <?php }?>
              <input type="hidden" name="measure[stomach][type]" value="<?php echo isset($measure['stomach']['type']) ? $measure['stomach']['type'] : '3'?>" />
            </dt>
            <dd<?php if($measure['stomach']['type'] == 1){echo ' class="active" ';}?> data-physique="<?php echo L('flat_stomach ');?>" data-physique-val="1">
              <img src="/statics/front/images/measure/stomach1.jpg" />
              <img src="/statics/front/images/measure/stomach1-1.jpg" class="bright" />
              <p><?php echo L('flat_stomach ');?></p>
              <i class="mark"></i>
            </dd>
            <dd<?php if($measure['stomach']['type'] == 3 || !isset($measure['stomach']['type'])){echo ' class="active" ';}?> data-physique="<?php echo L('slightly_rounded_stomach');?>" data-physique-val="3">
              <img src="/statics/front/images/measure/stomach2.jpg" />
              <img src="/statics/front/images/measure/stomach2-1.jpg" class="bright" />
              <p><?php echo L('slightly_rounded_stomach');?></p>
              <i class="mark"></i>
            </dd>
            <dd<?php if($measure['stomach']['type'] == 5){echo ' class="active" ';}?> data-physique="<?php echo L('rounded_stomach');?>" data-physique-val="5">
              <img src="/statics/front/images/measure/stomach3.jpg" />
              <img src="/statics/front/images/measure/stomach3-1.jpg" class="bright" />
              <p><?php echo L('rounded_stomach');?></p>
              <i class="mark"></i>
            </dd>
          </dl>
          <dl class="pull-right">
            <dt>
              <strong><?php echo L('flat_posture_1');?></strong>
              <?php if(isset($measure['posture']['type'])){?>
              <?php if($measure['posture']['type']==1){?>
              <em>(<?php echo L('flat_posture');?>)</em>
              <?php }elseif($measure['posture']['type']==2){?>
              <em>(<?php echo L('between_flat_and_straight');?>)</em>
              <?php }elseif($measure['posture']['type']==3){?>
              <em>(<?php echo L('straight_posture');?>)</em>
              <?php }elseif($measure['posture']['type']==4){?>
              <em>(<?php echo L('between_straight_and_relaxed');?>)</em>
              <?php }else{?>
              <em>(<?php echo L('relaxed_posture');?>)</em>
              <?php }?>
              <?php }else{?>
              <em>(<?php echo L('straight_posture');?>)</em>
              <?php }?>
              <input type="hidden" name="measure[posture][type]" value="<?php echo isset($measure['posture']['type']) ? $measure['posture']['type'] : '3'?>" />
            </dt>
            <dd<?php if($measure['posture']['type'] == 1){echo ' class="active" ';}?> data-physique="<?php echo L('flat_posture');?>" data-physique-val="1">
              <img src="/statics/front/images/measure/posture2.jpg" />
              <img src="/statics/front/images/measure/posture2-1.jpg" class="bright" />
              <p><?php echo L('flat_posture');?></p>
              <i class="mark"></i>
            </dd>
            <dd<?php if($measure['posture']['type'] == 3 || !isset($measure['posture']['type'])){echo ' class="active" ';}?> data-physique="<?php echo L('straight_posture');?>" data-physique-val="3">
              <img src="/statics/front/images/measure/posture1.jpg" />
              <img src="/statics/front/images/measure/posture1-1.jpg" class="bright" />
              <p><?php echo L('straight_posture');?></p>
              <i class="mark"></i>
            </dd>
            <dd<?php if($measure['posture']['type'] == 5){echo ' class="active" ';}?> data-physique="<?php echo L('relaxed_posture');?>" data-physique-val="5">
              <img src="/statics/front/images/measure/posture3.jpg" />
              <img src="/statics/front/images/measure/posture3-1.jpg" class="bright" />
              <p><?php echo L('relaxed_posture');?></p>
              <i class="mark"></i>
            </dd>
          </dl>
        </div>
      </div>
      <div class="optional-box" data-panel-type="optional-index">
        <i class="fa fa-camera"></i>
        <strong class="title"><?php echo L('measure_guide_31');?></strong>
        <p class="mb4x"><?php echo L('measure_guide_32');?></p>
        <button type="button" class="btn btn-middle upload-photo js-upload-photo hide"><?php echo L('upload_img');?><i></i></button>
      </div>
      <div class="optional-box" <?php if($edit_type == 'photo'){echo ' style="display:block;"';}?>>
        <strong class="title"><?php echo L('measure_guide_33');?></strong>
        <p><?php echo L('measure_guide_34');?></p>
        <p class="hide js-go-taking-photo" style="color:#777;"><?php echo L('measure_guide_35');?><span class="js-to-next" style="color:#3eabb8;text-decoration:underline;cursor:pointer;"><?php echo L('measure_guide_36');?></span><?php echo L('measure_guide_37');?></p>
        <ul class="photo-list row">
          <li class="col-sm-6 col-md-5 col-md-offset-1">
            <strong><?php echo L('front');?></strong>
            <img id="front_img_show" src="<?php if($measureInfo['front_img']):?><?php echo $measureInfo['front_img']?><?php else:?>/statics/front/images/measure/front.jpg<?php endif;?>" alt="<?php echo L('your_front_photo');?>" />
            <span class="btn btn-upload btn-middle">
              <?php echo L('Upload');?>
              <iframe src="<?php echo url('measure/uploadimg',array('type'=>'front'));?>" scrolling="no"></iframe>
            </span>
          </li>
          <li class="col-sm-6 col-md-5">
            <strong><?php echo L('side');?></strong>
            <img id="side_img_show" src="<?php if($measureInfo['side_img']):?><?php echo $measureInfo['side_img']?><?php else:?>/statics/front/images/measure/side.jpg<?php endif;?>" alt="<?php echo L('your_side_photo');?>" />
            <span class="btn btn-upload btn-middle">
              <?php echo L('Upload');?>
              <iframe src="<?php echo url('measure/uploadimg',array('type'=>'side'));?>" scrolling="no"></iframe>
            </span>
          </li>
        </ul>
      </div>
      <div class="optional-box" data-panel-type="front-photographing-panel">
        <strong class="title"><?php echo L('_Front_');?></strong>
        <p style="width:100%;"><?php echo L('photo_tips');?></p>
        <ul class="photo-list row">
          <li class="col-sm-6 col-md-5 col-md-offset-1">
            <strong><?php echo L('front_example');?></strong>
            <img src="/statics/front/images/measure/front.jpg" alt="<?php echo L('your_side_photo');?>" />
          </li>
          <li class="col-sm-6 col-md-5">
            <div class="photograph-area">
              <video class="js-video-front"></video>
              <i class="fa fa-camera"></i>
              <button type="button" data-text="<?php echo L('REDO');?>" data-webcam-tip="<?php echo L('webcam_tip');?>" class="btn btn-middle js-snapshot js-snapshot-front"><?php echo L('TAKE_PHOTO');?></button>
            </div>
          </li>
        </ul>
      </div>
      <div class="optional-box">
        <strong class="title"><?php echo L('_Side_');?></strong>
        <p style="width:100%;"><?php echo L('photo_tips');?></p>
        <ul class="photo-list row">
          <li class="col-sm-6 col-md-5 col-md-offset-1">
            <strong><?php echo L('side_example');?></strong>
            <img src="/statics/front/images/measure/side.jpg" alt="<?php echo L('your_side_photo');?>" />
          </li>
          <li class="col-sm-6 col-md-5">
            <div class="photograph-area">
              <video class="js-video-side"></video>
              <i class="fa fa-camera"></i>
              <button type="button" data-text="<?php echo L('REDO');?>" data-webcam-tip="<?php echo L('webcam_tip');?>" class="btn btn-middle js-snapshot js-snapshot-side"><?php echo L('TAKE_PHOTO');?></button>
            </div>
          </li>
        </ul>
      </div>
    </div>
    <?php if(!$measureInfo):?>
    <input type="hidden" name="measure_name" value="<?php echo $measureBeginCookie['name']?>" />
    <input type="hidden" name="measure[age]" value="<?php echo $measureBeginCookie['age']?>" />
    <input type="hidden" name="measure[height][cm]" value="<?php echo $measureBeginCookie['height']?>" />
    <input type="hidden" name="measure[weight][kg]" value="<?php echo $measureBeginCookie['weight']?>" />
    <input type="hidden" name="unit" value="<?php echo $measureBeginCookie['m_unit']?>" />
    <?php endif;?>
    <input type="hidden" name="front_photo" id="front_img_val" />
    <input type="hidden" name="side_photo"  id="side_img_val" />

    <button type="button" class="pull-left btn prev js-prev hide"><?php echo L('_PAGE_PREV_');?><i></i></button>
    <button type="button" class="btn next js-next<?php if($_GET['edit_type'] == 'photo' || $_GET['edit_type'] == 'describe'):?> hide<?php endif;?>"><?php echo L('_PAGE_NEXT_');?><i></i></button>
    <button type="submit" class="pull-right btn submit js-submit<?php if($_GET['edit_type'] != 'photo' && $_GET['edit_type'] != 'describe'):?> hide<?php endif;?>"><?php echo L('submit');?><i></i></button>
  </form>
  <input type="hidden" name="edit_type" value="<?php echo $_GET['edit_type']?>" />
</div>
<script src="/statics/front/js/scripts/measure/common.js"></script>
<script src="/statics/front/js/scripts/measure/estimation.js"></script>
<script src="/statics/front/js/scripts/measure/photograph.js"></script>
<?php include THEMES_PATH.'public/footer2.phtml';?>
<?php include THEMES_PATH.'public/after_body.phtml';?>
